package lt.ntec.danblog.server.core;

import com.google.inject.Guice;
import com.google.inject.Injector;
import lt.ntec.danblog.server.blog.BlogServletModule;
import lt.ntec.danblog.server.blog.model.objectify.ObjectifyBlogModelModule;
import lt.ntec.danblog.server.core.http.impl.CoreHttpModule;
import lt.ntec.danblog.server.core.model.objectify.ObjectifyCoreModelModule;
import lt.ntec.danblog.server.core.view.impl.ViewModule;

public class GuiceFactory {

    private static final Injector inj =
            Guice.createInjector(new BlogServletModule(),
                                 new CoreServletModule(),
                                 new ObjectifyBlogModelModule(),
                                 new ObjectifyCoreModelModule(),
                                 new CoreHttpModule(),
                                 new ViewModule());

    public static Injector getInjector() {
        return inj;
    }
}